package com.csy.basethread;

import com.csy.util.ILogFactory;
import org.junit.Test;

public class Test003 implements ILogFactory {
    @Test
    public void main() {
        log.info("主线程开始。。。。。。");
        Thread thread1 = new Thread(new Runnable() {
            public void run() {
                for (int i = 0; i < 10; i++) {
                    log.info("子线程1-i:{}", i);
                }
            }
        });
        thread1.start();
        new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                log.info("子线程2-i:{}", i);
            }
        }).start();
        for (int i = 0; i < 10; i++) {
            log.info("主线程i:{}", i);
        }
        log.info("主线程结束。。。。。。");
    }
}